<template>
  <el-container>
    <el-header class="homeHeader">
      <div>
        <i class="el-icon-s-custom" style="font-size: 20px;margin-left: 5px">
          供货商工作台
        </i>
      </div>
      <span>欢迎您，</span>
    </el-header>
    <el-container>
      <el-aside>
        <el-menu class="headerMenu" @click="menuClick" router>

            <el-menu-item index="/informationShow">
              <template slot="title">
                <i class="el-icon-user"></i>
                个人信息
              </template>


            </el-menu-item>

            <el-menu-item index="/brandShow">
              <template slot="title">
                <i class="el-icon-folder"></i>
                品牌信息
              </template>
            </el-menu-item>

            <el-menu-item index="/warehouseShow">
              <template slot="title">
                <i class="el-icon-house"></i>
                仓库管理
              </template>
            </el-menu-item>
          <el-menu-item index="/goodsShow">
              <template slot="title">
                <i class="el-icon-goods"></i>
                商品管理
              </template>
          </el-menu-item>
          <el-menu-item index="/orderShow">
            <template slot="title">
              <i class="el-icon-s-order"></i>
              订单管理
            </template>
          </el-menu-item>
        </el-menu>
      </el-aside>
      <el-main>
        <el-breadcrumb separator-class="el-icon-arrow-right" v-if="this.$router.currentRoute.path!='/home'">
          <el-breadcrumb-item :to="{ path: '/home' }">首页</el-breadcrumb-item>
          <el-breadcrumb-item>{{this.$router.currentRoute.name}}</el-breadcrumb-item>
        </el-breadcrumb>
        <div class="homeWelcome" style="text-align: center;font-size: 40px" v-if="this.$router.currentRoute.path=='/home'">
              欢迎来到跨境电商平台!
        </div>
        <router-view  style="margin-top: 30px"/>
      </el-main>
    </el-container>
  </el-container>
</template>

<script>
export default {
  name: "Home",
  mounted() {
    this.user = JSON.parse(window.sessionStorage.getItem("user"))
  },
  data(){
    return{
      user:''
    }
  },
  methods:
    {
      menuClick(index){
        this.$router.push(index);
      }
    }

}
</script>

<style>
.homeHeader{
  background-color: aliceblue;
  display: flex;
  align-items: center;
  text-align: justify;
  justify-content: space-between;
  padding: 0 15px;
  font-size: 20px;
}
</style>
